//
//  KPersonTableViewCell.m
//  YaDiuDiu
//
//  Created by 谭攀 on 2017/10/29.
//  Copyright © 2017年 jy. All rights reserved.
//

#import "KPersonTableViewCell.h"

@implementation KPersonTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        UIImageView *imgView = [UIImageView new];
        [self.contentView addSubview:imgView];
        
        [imgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(10);
            make.top.mas_equalTo(5);
            make.width.height.mas_equalTo(25);
        }];
        [imgView.layer setCornerRadius:12.5];
        imgView.backgroundColor = [UIColor grayColor];
        
        UILabel *label = [UILabel new];
        label.font = [UIFont systemFontOfSize:13];
        label.text = @"ananannna";
        [self.contentView addSubview:label];
        
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(imgView.mas_right).offset(10);
            make.top.mas_equalTo(5);
            make.width.mas_equalTo(ScreenWidth - 45 - 90);
            make.height.mas_equalTo(20);
        }];
        
        UILabel *timeLaebl = [UILabel new];
        timeLaebl.font = [UIFont systemFontOfSize:13];
        timeLaebl.text = @"ananannna";
        [self.contentView addSubview:timeLaebl];
        
        [timeLaebl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(label.mas_right).offset(10);
            make.top.mas_equalTo(5);
            make.width.mas_equalTo(70);
            make.height.mas_equalTo(25);
        }];
        
        
        //
        StarView *starView = [[StarView alloc]init];
        starView.showStar = 5 * 30;
        [self.contentView addSubview:starView];
        [starView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(imgView.mas_right).offset(10);
            make.top.equalTo(label.mas_bottom).offset(5);
            make.width.mas_equalTo(120);
            make.height.mas_equalTo(20);
        }];
        
        //
        UILabel *botttomLabel = [UILabel new];
        botttomLabel.text = @"ananannna";
        [self.contentView addSubview:botttomLabel];
        botttomLabel.font = [UIFont systemFontOfSize:13];
        [botttomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(imgView.mas_right).offset(10 );
            make.top.equalTo(timeLaebl.mas_bottom).offset(30);
            make.width.mas_equalTo(ScreenWidth - 40);
            make.height.mas_equalTo(20);
        }];
        
    }
    return self;
}





@end
